﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteRequireLogin.Master" AutoEventWireup="true" CodeBehind="CheckDetailTransaction.aspx.cs" Inherits="TranTekBE.Admin.WebForm1" %>

<%@ Register Src="~/Admin/UserControl/MenuAdmin.ascx" TagPrefix="uc1" TagName="MenuAdmin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="BodyContent" runat="server">
    <asp:UpdatePanel ID="UpdatePanel" runat="server"  >
        <ContentTemplate>
            <div style="position: absolute;margin-top: 50px;">

            <uc1:MenuAdmin runat="server" ID="MenuAdmin" />


            <h1 style="">XEM SỐ LƯỢNG GIAO DỊCH</h1>
            
            <table style="width:100%">
                <tr><td>
                    <br></td></tr>
                <tr>
                    <td class="tdLeftM msgError"><asp:Literal ID="ltError" runat="server" /></td>
                    <td></td>
                </tr>


                <tr>
                    <td colspan="2" class="auto-style1">
                        <table>
                                <tr>
                                    <td align="right"></td>
                                    <td>
                                       
                                    </td>
                                    <td align="right">Cửa hàng :</td>
                                    <td>
                                        <asp:DropDownList runat="server" ID="ddlStore" AutoPostBack="true" OnSelectedIndexChanged="ddlStore_SelectedIndexChanged">
                                            
                                        </asp:DropDownList>

                                    </td>
                                    <td rowspan="2">
                                        <asp:Button ID="btnFilter" runat="server" CssClass="buttonPharmacity" Height="55px" OnClick="btnFilter_Click" Text="Lọc" Width="151px" /> 
                                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                             
                                         
                                    </td>
                                </tr>
                                <tr>
                                      <td align="right">Từ ngày :</td>
                                    <td><asp:TextBox runat="server" ID="txtFrom" Width="90px"></asp:TextBox></td>
                                    <td align="right">Đến ngày:</td>
                                    <td><asp:TextBox runat="server" ID="txtTo" Width="90px"></asp:TextBox></td>
                                </tr>
                        </table>
                    </td>
                    <td class="auto-style1"></td>
                </tr>
                 
               
          
                <tr><td></td><td></td></tr>
                <tr ><td style="padding-bottom:20px;padding-top:20px" colspan="4"><hr /></td></tr>
                <tr>
                    <td class="tdLeftM">
                        <asp:PlaceHolder ID="phPageNavigation" runat="server" Visible="true">
                        <asp:Button ID="btnSort" runat="server" Text="Sắp sếp" Width="70px" CommandName="Sort"  />
                        <asp:DropDownList ID="ddlSortBy" runat="server" >
                            <asp:ListItem Selected="True" Text="Mã Hóa Đơn" Value="ID_Bill"  />
                            <asp:ListItem  Text="Số dòng trên bill" Value="RecordsInBill"  />
                            <asp:ListItem  Text="Số lượng bán sản phẩm bán trên bill" Value="ItemsSaleInBill"  />
                        </asp:DropDownList>
                        <asp:DropDownList ID="ddlSortDirect" runat="server" >
                            <asp:ListItem Text="Tăng dần" Value="ASC"  />
                            <asp:ListItem Selected="True" Text="Giảm dần" Value="DESC" />
                        </asp:DropDownList>
                        
                            <asp:Button ID="btnGoPage" runat="server" Text="Đến trang" CommandName="GoToPage"  />
                            <asp:TextBox ID="txtGoPage" runat="server" Width="30px" MaxLength="3" />
                            <asp:Button ID="btnPrev" runat="server" CommandName="GoToPrev" Text="<<"  />
                            <asp:Literal ID="ltPage" runat="server" />
                            <asp:Button ID="btnNext" runat="server" CommandName="GoToNext" Text=">>"  />
                       
                        Dòng trên trang: <asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="true"  />
                             </asp:PlaceHolder>
                    </td>
                    <td></td>
                </tr>
             
                <tr>
                    <th class="thGrid" style="width:3%;">STT.</th>
                    <th class="thGrid" style="width:90px;">
                        <asp:LinkButton ID="lbMaBill" runat="server" CommandArgument="ASC" CommandName="ID_Bill" CssClass="GridHeader sortAsc" onclick="Sort_Click" Text="Mã hóa đơn" />
                    </th>
                    <th class="thGrid" style="width:90px;">
                        <asp:LinkButton ID="lbSoLuongTrenBill" runat="server" CommandArgument="Desc" CommandName="RecordsInBill" CssClass="GridHeader " onclick="Sort_Click" Text="Số lượng dòng in trên bill" />
                    </th>
                    <th class="thGrid" style="width:90px;">
                        <asp:LinkButton ID="lbSoLuongThuocBan" runat="server" CommandArgument="Desc" CommandName="ItemsSaleInBill" CssClass="GridHeader" onclick="Sort_Click" Text="Tổng số loại thuốc bán trên bill" />
                    </th>
                </tr>
                <tr>
                    <td class="tdGrid tdCenterM" style="height: 35px">
                        <table class="centerObject">
                            <tr>
                                <td>
                                    <asp:ImageButton ID="btnClearSearch" runat="server" ImageUrl="../images/ico_clear_search.gif" onclick="btnClearSearch_Click" ToolTip="Clear Search" Height="10px" />
                                </td>
                                <td>
                                    <asp:ImageButton ID="btnSearch" runat="server" ImageUrl="../images/ico_search.gif" onclick="btnSearch_Click" ToolTip="Search" />
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="tdGrid tdCenterM" style="height: 35px">
                        <asp:TextBox ID="txtStoreName" runat="server" Width="98%" />
                    </td>
                    <td class="tdGrid tdCenterM" style="height: 35px"></td>
                    <td class="tdGrid tdCenterM" style="height: 35px"></td>
                </tr>
                <asp:Repeater ID="rpRevenue" runat="server">
                    <ItemTemplate>
                        <tr style='<%# ThuVien.FunctionsUtils.CSS_RowInTable(Container.ItemIndex,"#FFFFE0","#D7E3F2") %>'>
                            <td class="tdGrid tdCenterM"><%# Container.ItemIndex + 1 %></td>
                            <td class="tdGrid tdLeftM">
                                <div style="float:left">
                                    <%# Eval("ID_Bill")%>
                                </div>
                                <div style="float:right;text-align:right;">
                                </div>
                            </td>
                            <td class="tdGrid tdCenterM"><%# TongSoDongTrenBill(Eval("RecordsInBill"))%></td>
                            <td class="tdGrid tdCenterM"><%# TongSoSanPhamBanTrenBill(Eval("ItemsSaleInBill"))%></td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
                <tr>
                    <td align="right" colspan="2"><b>Tổng Cộng:</b></td>
                    <td class="tdCenterM">
                        <asp:Literal ID="ltlTCSoDongTrenBill" runat="server"></asp:Literal>
                    </td>
                    <td align="center">
                        <asp:Literal ID="ltlTCSoSanPhamBanTrenBill" runat="server"></asp:Literal>
                    </td>
                </tr>
                <asp:Literal ID="ltNoRecord" runat="server" Visible="false">
                                <tr><td colspan="8" class="tdGrid tdCenterM">Không có dữ liệu</td></tr>
                            </asp:Literal>
            </table>
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                <div id="line_chart">
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
                </tr>
                </table>
                <table><tr><td><br /><br /><br /><br /></td></tr></table>

            <script type="text/javascript">
                function LoadJS() {
                  
                    $("#<%=txtFrom.ClientID %>").datepicker(
                        {
                            changeMonth: true,
                            changeYear: true,
                            showButtonPanel: true,
                        }
                    );
                    $("#<%=txtTo.ClientID %>").datepicker(
                         {
                             changeMonth: true,
                             changeYear: true,
                             showButtonPanel: true,
                         }
                        );


                    //setTimeout("DrawChart();",5000);
                    
                
                }
           
            </script>
        </div>
           
        </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>
